# -*- coding: utf-8 -*-
"""
中性策略框架 | 邢不行 | 2024分享会
author: 邢不行
微信: xbx6660
"""

def signal(*args):
    df = args[0]
    n = args[1]
    factor_name = args[2]

    change = df['close'].pct_change()
    df[factor_name] =change.rolling(n).std()

    return df